package model;

public class Book extends Product {
    private String isbn;

    public Book(String pid, String name, double price, String isbn) {
        super(pid, name, price);
        this.isbn = isbn;
    }

    public String getIsbn() { return isbn; }

    @Override
    public String getDescription() {
        return getBasicInfo() + ", 类别:图书, ISBN:" + isbn;
    }

    public void open() {
        System.out.println("【" + getName() + "】翻开 ISBN:" + isbn);
    }
}